import request from '../utils/request';

export const sysDeptPage = query => {
    return request({
        url: '/sysDept/queryDeptList',
        method: 'get',
        params: query
    });
};

export const sysDeptAndCheckedList = query => {
    return request({
        url: '/sysDept/queryDeptAndCheckedList',
        method: 'get',
        params: query
    });
};

export const currentUserSysDeptList = query => {
    return request({
        url: '/sysDept/queryCurrentUserDeptList',
        method: 'get',
        params: query
    });
};

export const saveSysDept = data => {
    return request({
        url: '/sysDept/save',
        method: 'post',
        data: data
    });
};

export const updateSysDept = data => {
    return request({
        url: '/sysDept/update',
        method: 'put',
        data: data
    });
};

export const delSysDept = data => {
    return request({
        url : '/sysDept/delete/' + data,
        method: 'delete'
    });
};